package com.formula.datastructure.question.search;

import com.formula.datastructure.standard.search.balancetree.BinarySearch;
import com.formula.datastructure.standard.sort.insert.DirectInsertSort;
import com.formula.datastructure.util.DataUtil;

public class BinSearchTest {
    public static void main(String[] args) {
        Integer[] array = DataUtil.genArray(15, 20);
        DirectInsertSort directInsert = new DirectInsertSort();
        array = directInsert.sort(array);
        DataUtil.printIndex(20);
        DataUtil.printArray(array);
        BinarySearch binary = new BinarySearch();
        System.out.println(binary.search(array, 14, 1));
        System.out.println(binary.search(array, 14, 2));

        binary.multipleSearch(array, 14);
    }
}
